package com.sg.dto.integration.app;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Objects;

/**
 * @desc TargetCatDto
 * @使用场景
 */
@Data
public class TargetCatDto extends BaseDto implements Serializable {

    /**
     * 目标分类ID
     */
    @ApiModelProperty("目标分类ID")
    private String targetCategoryId;

    /**
     * 目标分类名称
     */
    @ApiModelProperty("目标分类名称")
    private String targetCategoryName;

    /**
     * 目标分类简介
     */
    @ApiModelProperty("目标分类简介")
    private String targetCategoryDescribe;

    /**
     * 目标分类标识
     */
    @ApiModelProperty("目标分类标识")
    private String targetCategoryCode;

    /**
     * 目标分类是否末级 TRUE:是 FALSE:否
     */
    @ApiModelProperty("目标分类是否末级")
    private String isLast;

    /**
     * 目标分类编号
     */
    @ApiModelProperty("目标分类编号")
    private String targetCategoryNumber;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        TargetCatDto that = (TargetCatDto) o;
        return (
                targetCategoryId == that.targetCategoryId &&
                        targetCategoryName == that.targetCategoryName &&
                        targetCategoryDescribe == that.targetCategoryDescribe &&
                        targetCategoryCode == that.targetCategoryCode &&
                        isLast == that.isLast &&
                        targetCategoryNumber == that.targetCategoryNumber
        );
    }

    @Override
    public int hashCode() {
        return Objects.hash(
                super.hashCode(),
                targetCategoryId,
                targetCategoryName,
                targetCategoryDescribe,
                targetCategoryCode,
                isLast,
                targetCategoryNumber
        );
    }

}
